home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / gnome-panel-data.preinst < prev    next >
Text File  |  2009-10-19  |  968b  |  32 lines

  1. #!/bin/sh
  2. set -e
  3.  
  4. rm_conffile() {
  5.     PKGNAME="$1"
  6.     CONFFILE="$2"
  7.  
  8.     if [ -e "$CONFFILE" ]; then
  9.         md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
  10.     old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE '{s/ obsolete$//;s/.* //p}\"`"
  11.         if [ "$md5sum" != "$old_md5sum" ]; then
  12.             echo "Obsolete conffile $CONFFILE has been modified by you."
  13.             echo "Saving as $CONFFILE.dpkg-bak ..."
  14.             mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
  15.         else
  16.             echo "Removing obsolete conffile $CONFFILE ..."
  17.             rm -f "$CONFFILE"
  18.         fi
  19.     fi
  20. }
  21.  
  22. case "$1" in
  23.     install|upgrade)
  24.     if dpkg --compare-versions "$2" le "1:2.23.92"; then
  25.        rm_conffile gnome-panel-data "/etc/gnome-vfs-2.0/vfolders/applications.template"
  26.        rm_conffile gnome-panel-data "/etc/menu-methods/gnome-panel-data"
  27.        rm_conffile gnome-panel-data "/etc/menu-methods/gnome-vfolder-user"
  28.     fi
  29. esac
  30.  
  31.  
  32.